package org.libarae.communication.response;

import org.libarae.communication.HTTPUtils;
import org.libarae.communication.XmlParseException;
import org.w3c.dom.Document;

public class WebLoginPageResponse extends Response {

	public WebLoginPageResponse() {
		super(-1, STATUS_GOOD);//TODO COMMONT.TYPE does have an HTTP only option, figure that out later
	}

	@Override
	public String createXML() throws XmlParseException {
		throw new RuntimeException("WebLoginPage is an HTML only process");
	}

	@Override
	public void decodeXML(Document document) {
		throw new RuntimeException("WebLoginPage is an HTML only process");
		
	}

	@Override
	public String createHTML() {
		
		return HTTPUtils.HTMLDefultHeader()+
		"<form action =\"login.html\"  method=\"post\">" +
		"<div class=\"holder\"><center><br/><table>"+
		"<tr><td>User Name:</td><td><input type=\"text\" name=\"mUserName\" /></td></tr>"+
		"<tr><td>Password:</td><td><input type=\"password\" name=\"mPassword\" /></td></tr>"+
		"</table><br/>"+
		"<input type=\"submit\" value=\"Login\" /></center>"+
		"</form>" +
		"</div></body>";
		
//		return "<body>" + 
//		"<h2> Welcome to the Libare Book Website </h2>" +
//		"<form action =\"login.html\"  method=\"post\">" +
//		"User Name: <input type=\"text\" name=\"mUserName\" />" +
//		"<br/>" +
//		"Password:  <input type=\"password\" name=\"mPassword\" />" +
//		"<br/>" +
//		"<input type=\"submit\" value=\"Login\" />" +
//		"</form>" +
//		"</body>";
	}



}
